<%--
  Created by IntelliJ IDEA.
  User: sun
  Date: 2020/5/3
  Time: 4:23 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isErrorPage="true" %>
<html>
  <head>
    <title>$Title$</title>
  </head>
  <body>

  <a href="${pageContext.request.contextPath }/hello/error">跳转error</a>
  <br/>
  <a href="${pageContext.request.contextPath }/hello/success">跳转success</a>

  <form action="${pageContext.request.contextPath }/hello/postForm" method="post">
    <label>param1
      <input type="text" name="param1">
    </label>
    <br/>
    <label>param2
      <input type="text" name="param4">
    </label>
    <br/>
    <label>param3
      <input type="text" name="param3">
    </label>
    <br/>
    <input type="submit">

    <br/>
    <a href="${pageContext.request.contextPath }/hello/pathVariable/99">testPathVariable</a>
  </form>

  <br/>
  <fieldset>
    <!-- 实验1 测试 REST风格 GET 请求 -->
    <a href="${pageContext.request.contextPath }/rest/1">testREST GET</a><br/><br/>
     
    <!-- 实验2 测试 REST风格 POST 请求 -->
    <form action="${pageContext.request.contextPath }/rest/1" method="POST">
      <input type="submit" value="testRESTPost">
    </form>
     
    <!-- 实验3 测试 REST风格 PUT 请求 -->
    <form action="${pageContext.request.contextPath }/rest/1" method="POST">
      <input type="hidden" name="_method" value="PUT">
      <input type="submit" value="testRESTPut">
    </form>
     
    <!-- 实验4 测试 REST风格 DELETE 请求 -->
    <form action="${pageContext.request.contextPath }/rest/1" method="POST">
      <input type="hidden" name="_method" value="DELETE">
      <input type="submit" value="testRESTDelete">
    </form>
  </fieldset>
  </body>
</html>
